﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.MQ
{
    /// <summary>
    /// 消息队列建造者
    /// </summary>
    public interface IMessageQueueBuilder
    {
        /// <summary>
        /// 添加消费者
        /// </summary>
        /// <param name="queue"></param>
        /// <param name="handlers"></param>
        /// <returns></returns>
        IMessageQueueBuilder AddConsumer(IDestination queue, params IMessageHandler[] handlers);
        /// <summary>
        /// 添加生产者
        /// </summary>
        /// <param name="queue"></param>
        /// <returns></returns>
        IMessageQueueBuilder AddProducer(IDestination queue);
        /// <summary>
        /// 构建消息队列提供者
        /// </summary>
        /// <returns></returns>
        IMessageQueueProvider Build();
    }
}
